#include <stdio.h>
#include <stdlib.h>
#include "list.h" // 请不要删除，否则检查不通过
//合并带头链表

void lnk_merge(LinkList A, LinkList B, LinkList C) {
    LinkList pA = A->next;
    LinkList pB = B->next;
    LinkList pcur = C;
    while(pA && pB)
    {
        pcur->next = pA;
        pA = pA->next;
        pcur = pcur->next;
        pcur->next = pB;
        pB = pB->next;
        pcur = pcur->next;
    }
    
    if(pA == NULL)
    pcur->next = pB;
    else
    pcur->next = pA;
}